{ config, lib, pkgs, ... }:

{
  programs.fish = {
    enable = true;
    shellAbbrs = {
      backup = "git commit --all -m update. && git push";
      #rebuild = "sudo nixos-rebuild switch #--option substituters=https://mirrors.ustc.edu.cn/nixos-channels/store";
      # frebuild 需要补上具体的flake.nix中的系统配置，比如nixos
      # frebuild = "sudo nixos-rebuild switch --flake .#";
      # frebuild-boot = "sudo nixos-rebuild boot --flake .#";
      # update = "cd /etc/nixos && nix flake update && sudo nixos-rebuild switch --flake .#";
      gc-nix = "sudo nix-collect-garbage -d";

      cat    = "bat";
      htop   = "btop";
      tldr   = "tealdeer";
      du     = "dust";
      find   = "fd";
      ls     = "eza";
      df     = "duf";
      #sqlite = "sqlite3";

      vim    = "nvim";
      vi     = "nvim";
      e      = "emacs -nw";
    };
    interactiveShellInit = "neofetch";
    shellInit = "starship init fish | source";
    vendor = {
      functions.enable = true;
      config.enable = true;
      completions.enable = true;
    };
  };
}
